import { http } from '@/utils/http'

//获取我的帖子列表
export function forumList(data){
	return http({
		url:'/system/forum/',
		method: 'GET',
		data:data
	})
}

//发布帖子
export function forumPost(data){
	return http({
		url:'/system/forum/',
		method: 'POST',
		data:data
	})
}

//点赞/取消点赞帖子
export function likeId(id){
	return http({
		url:'/system/forum/'+ id +'/like/',
		method: 'POST'
	})
}

// 评论帖子
export function commentPost(data, id){
	return http({
		url:`/system/forum/${id}/comment/`,
		method: 'POST',
		data:data
	})
}

//点赞/取消点赞帖子
export function likeComment(data){
	return http({
		url:'/system/forum/like-comment/',
		method: 'POST',
		data:data
	})
}

//获取评价
export function commentsList(id){
	return http({
		url:'/system/forum/'+ id +'/comments/',
		method: 'GET'
	})
}

//评论点赞
export function commentLikeId(data){
	return http({
		url:'/system/forum/like-comment/',
		method: 'POST',
		data:data
	})
}